package com.haixiaoke.saas.house.service.impl;

import java.util.List;

import com.haixiaoke.saas.common.utils.DateUtils;
import com.haixiaoke.saas.house.domain.HouseLabel;
import com.haixiaoke.saas.house.mapper.HouseLabelMapper;
import com.haixiaoke.saas.house.service.IHouseLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 房屋标签Service业务层处理
 * 
 * @author panda
 * @date 2025-06-25
 */
@Service
public class HouseLabelServiceImpl implements IHouseLabelService {
    @Autowired
    private HouseLabelMapper houseLabelMapper;

    /**
     * 查询房屋标签
     * 
     * @param labelId 房屋标签主键
     * @return 房屋标签
     */
    @Override
    public HouseLabel selectHouseLabelByLabelId(Long labelId) {
        return houseLabelMapper.selectHouseLabelByLabelId(labelId);
    }

    /**
     * 查询房屋标签列表
     * 
     * @param houseLabel 房屋标签
     * @return 房屋标签
     */
    @Override
    public List<HouseLabel> selectHouseLabelList(HouseLabel houseLabel) {
        return houseLabelMapper.selectHouseLabelList(houseLabel);
    }

    /**
     * 新增房屋标签
     * 
     * @param houseLabel 房屋标签
     * @return 结果
     */
    @Override
    public int insertHouseLabel(HouseLabel houseLabel) {
        houseLabel.setCreateTime(DateUtils.getNowDate());
        return houseLabelMapper.insertHouseLabel(houseLabel);
    }

    /**
     * 修改房屋标签
     * 
     * @param houseLabel 房屋标签
     * @return 结果
     */
    @Override
    public int updateHouseLabel(HouseLabel houseLabel) {
        houseLabel.setUpdateTime(DateUtils.getNowDate());
        return houseLabelMapper.updateHouseLabel(houseLabel);
    }

    /**
     * 批量删除房屋标签
     * 
     * @param labelIds 需要删除的房屋标签主键
     * @return 结果
     */
    @Override
    public int deleteHouseLabelByLabelIds(Long[] labelIds) {
        return houseLabelMapper.deleteHouseLabelByLabelIds(labelIds);
    }

    /**
     * 删除房屋标签信息
     * 
     * @param labelId 房屋标签主键
     * @return 结果
     */
    @Override
    public int deleteHouseLabelByLabelId(Long labelId) {
        return houseLabelMapper.deleteHouseLabelByLabelId(labelId);
    }

    @Override
    public int checkHouseLabel(HouseLabel houseLabel) {
        return houseLabelMapper.checkHouseLabel(houseLabel);
    }

    @Override
    public List<HouseLabel> selectHouseLabelByLabelIds(List<Long> labelIds) {
        return houseLabelMapper.selectHouseLabelByLabelIds(labelIds);
    }
}
